//
//  YYEvent.h
//  LearnObjectiveC
//
//  Created by client on 2017/9/18.
//  Copyright © 2017年 吴可高. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "YYStateMachineTypedefiner.h"
@class YYTransition;


@interface YYEvent : NSObject
@property(nonatomic,strong,readonly) NSString * name;
@property(nonatomic,strong,readonly) NSSet * transitions;
@property(nonatomic,strong,readonly) NSArray * beforeCallbacks;
@property(nonatomic,strong,readonly) NSArray * afterCallbacks;


+ (id)eventWithName:(NSString *)name transitions:(NSSet *)transitions;
- (id)initWithName:(NSString *)name transitions:(NSSet *)transitions;

+ (id)eventWithName:(NSString *)name
        transitions:(NSSet *)transitions
    beforeCallbacks:(NSArray *)beforeCallbacks
     afterCallbacks:(NSArray *)afterCallbacks;

- (id)initWithName:(NSString *)name
       transitions:(NSSet *)transitions
   beforeCallbacks:(NSArray *)beforeCallbacks
    afterCallbacks:(NSArray *)afterCallbacks;

-(YYEvent*)addTransition:(YYTransition*)transition;
-(YYEvent*)addBeforeCallback:(YYStateMachineTransitionCallback)beforeCallback;
-(YYEvent*)addAfterCallback:(YYStateMachineTransitionCallback)afterCallback;

@end
